<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualStudio.HTML>
<meta name=Originator content="Microsoft Visual Studio .NET 7.1">
<META name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<?XML:NAMESPACE PREFIX="WM"/>
<?XML:NAMESPACE PREFIX="DIMOK"/>
<?IMPORT namespace="DIMOK" implementation="/include/HTC/ShowRS.htc" >
<LINK rel="stylesheet" type="text/css" href="/CSS/navbar.css">
<LINK rel="stylesheet" type="text/css" href="/CSS/Outlook.css">
<STYLE>
WM\:DROPMENU { BEHAVIOR: url(/include/HTC/dropmenu_d.htc) }
.rowover{BEHAVIOR: url(/include/HTC/rowover_js.htc)}
.export {FONT-WEIGHT:bold;COLOR:navy;CURSOR:hand}
</STYLE>
<SCRIPT src=/Include/common.js></SCRIPT>
<SCRIPT src=/include/RDS.js></SCRIPT>
<SCRIPT src=/include/SOAP.js></SCRIPT>
<SCRIPT src="/Include/DropMenu.js"></SCRIPT>
<SCRIPT src="/manager/common/common.js"></SCRIPT>
<SCRIPT>
	document.write("<TITLE>"+getParam("title")+"</TITLE>");
</SCRIPT>
</head>
<body onload="page_Load()" style="OVERFLOW: auto" scroll="yes" onkeypress="if(event.keyCode==24)copyBody(showRS.Document)">
<DIMOK:SHOW_RS id="showRS" onAfterFilter="setRecCount()" onselect="onSelectRow(event)">
	<DIV id="divListTempl" style="BORDER-RIGHT:appworkspace 0px solid; BORDER-TOP:appworkspace 0px solid; DISPLAY:none; BORDER-LEFT:appworkspace 0px solid; BORDER-BOTTOM:appworkspace 0px solid">
		<TABLE id="tblTempl" onreadystatechange="cropMe(this)" border="1" cellpadding="0" onresize="cropWindow()"
			cellspacing="0" bordercolor="white" 
			style="DISPLAY:none;WIDTH:100%;BORDER-COLLAPSE:collapse;BACKGROUND-COLOR: whitesmoke"
			rowover="1" striped="0" selectable="1">
			<THEAD>
				<TR valign="bottom" bgcolor="menu">
					<TH style="padding-left:0px;padding-right:0px" clone=" ">
					</TH>
				</TR>
			</THEAD>
			<TBODY>
				<TR align="left" style="CURSOR:hand" onclick="onSelect(this)">
					<TD align="left" clone=" " nowrap><SPAN datafld="*" style="MARGIN-LEFT: 2px;MARGIN-Right: 2px" dataformatas="html" oncontextmenu="return showRowMenu()"></SPAN></TD>
				</TR>
			</TBODY>
		</TABLE>
	</DIV>
</DIMOK:SHOW_RS>
</body>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</html>
<SCRIPT language="javascript">
var noApplID = getParam("NoApplID");
var servicePath = unescape(getParam("servicePath"));
var serviceFunc = unescape(getParam("serviceFunc"));
var onFilter = unescape(getParam("onFilter"));
initWS("Common","../Common/Common.asmx");
attachToKeyDown();
focus();
// ***** Init Page *****
function page_Load(){
	showRS.servicePath = "../Common/Common.asmx";
	showRS.serviceFunc = "FindInMegasysEx()";
	showRS.onFilter = "FindInMegasysEx";
}
function doFilter(){
	var ret = WS(CO(showRS.serviceFunc),event.rs.Filter);
	if( showSOAPError(ret) )return false;
	showRS.ShowList(ret);
}
function onSelectRow(ev){
	doOnSelect(ev.fieldName);
}
function ExportFromMegasys(el){
	event.cancelBubble = true;
	if( !checkVIN(el) )return;
	var msID = rsField(el,"XFA_ACCOUNT").Value
	if( !confirm("Export "+msID+"?") )return;
	var ret = WS(CO(),msID);
	if( showSOAPError(ret) )return;
	rsField(el,"LoanID").Value = ret.value;
	showApplInfo(ret.value+"");
}
function showContractTitle(el){
	if( !checkVIN(el) )return;
	var MsID = rsField(el,"XFA_ACCOUNT");
	open("/Manager/Forms/ContractTitle.aspx?MsID="+MsID);
}
function showRowMenu(){
	var e = event.srcElement;
	var menu = new DropMenu("mnuFly");
	if( !menu.menuID )return false;
	menu.imageStyle += ";margin-top:0px;margin-bottom:0px";
	menu.add("Show Envelop","showContractTitle(ce)");
	menu.add("Copy","copyElement(ce)");
	menu.menuShow(getLeftPos(e),event.y-event.offsetY+e.offsetHeight-3);
	event.cancelBubble = true;
	return false;
}
function setRecCount(){
 if( !setRecCount.title )setRecCount.title = document.title;
 document.title = setRecCount.title+" : "+event.rs.recordCount+" records";
}
function checkVIN(el){
	var vc = rsField(el,"VC").Value;
	if( vc == "False" )return alert("VIN is incorrect!");
	return true;
}
function cropMe(tbl){
	if( tbl.readyState != 'complete' )return;
	clearTimeout(cropMe.proc);
	cropMe.proc = setTimeout(function(){cropWindow()},500);
}
</SCRIPT>
